package com.acme.bankapp.domain;
import java.io.Serializable;

import com.acme.bankapp.exception.*;
import com.acme.bankapp.domain.Client;
/**
 * An abstract class contains methods:
 *void deposite(double delta): Increase the balance on the delta.
 *void withdraw(double delta): Withdraw the delta.
 *public double getBalance(): Return the value of the balance sheet.
 *public double maxCredit(): Return the value of the maximum credit that can be given to the customer by the bank.
 *The goal of creating new field private Client client and methods public Client getClient() and public void setClient(Client client) is realization idea 
 *that the Account can't exist without the Client. 
 *public long DecimalValue() returns the integer value of the account balance.
 * @author Troitskaya Anastasia
 *
 */
public abstract class Account implements Serializable{
	private double balance;
	private Client client;
	void deposite(double delta) {};
	void withdraw(double delta) throws NotEnoughFundsException {};
	public double getBalance() { return this.balance; };
	public double maxCredit() { return this.balance; };
	public Client getClient() { return this.client; };
	public void setClient(Client client) { this.client = client; };
	public long DecimalValue() { return Math.round(this.balance); };
}
